package com.kayt.cyberBar.message.business.entity.po;

import java.io.Serializable;
import javax.persistence.*;

import org.codehaus.jackson.annotate.JsonBackReference;
import org.codehaus.jackson.annotate.JsonIgnore;

/**
 * The persistent class for the b_message_detail_item database table.
 * 
 */
@Entity
@Table(name="b_message_detail_item")
@NamedQuery(name="BMessageDetailItem.findAll", query="SELECT b FROM BMessageDetailItem b")
public class BMessageDetailItem implements Serializable {
	private static final long serialVersionUID = 1L;
	private Long id;
	private String code;
	private String createTime;
	private String itemCode;
	private String itemType;
	private String detailCode;
	private String updateTime;
	
	private BMessageNoticeDetail detail;

	public BMessageDetailItem() {
	}


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}


	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}


	@Column(name="CREATE_TIME")
	public String getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}


	@Column(name="ITEM_CODE")
	public String getItemCode() {
		return this.itemCode;
	}

	public void setItemCode(String itemCode) {
		this.itemCode = itemCode;
	}


	@Column(name="ITEM_TYPE")
	public String getItemType() {
		return this.itemType;
	}

	public void setItemType(String itemType) {
		this.itemType = itemType;
	}


	@Column(name="UPDATE_TIME")
	public String getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}
	
	
	@Column(name="DETAIL_CODE")
	public String getDetailCode() {
		return detailCode;
	}


	public void setDetailCode(String detailCode) {
		this.detailCode = detailCode;
	}


	@ManyToOne(targetEntity = BMessageNoticeDetail.class, fetch = FetchType.LAZY)
	@JoinColumn(name="DETAIL_CODE", referencedColumnName="CODE", nullable = false, insertable=false, updatable=false)
	@JsonIgnore
	public BMessageNoticeDetail getDetail() {
		return detail;
	}


	public void setDetail(BMessageNoticeDetail detail) {
		this.detail = detail;
	}
}